using Intelli.Cust.Svcs.Models;

namespace Intelli.Cust.Svcs.Services
{
    public interface IIntelligentCustomerService
    {
        /// <summary>
        /// 处理用户自然语言输入，返回智能回复
        /// </summary>
        /// <param name="userId">用户ID</param>
        /// <param name="input">用户输入</param>
        /// <param name="sessionId">会话ID</param>
        /// <returns>智能回复</returns>
        Task<CustomerServiceResponse> ProcessUserInputAsync(string userId, string input, string sessionId);

        /// <summary>
        /// 获取对话历史
        /// </summary>
        /// <param name="sessionId">会话ID</param>
        /// <param name="limit">限制条数</param>
        /// <returns>对话历史</returns>
        Task<List<ConversationHistory>> GetConversationHistoryAsync(string sessionId, int limit = 10);

        /// <summary>
        /// 评价回复质量
        /// </summary>
        /// <param name="sessionId">会话ID</param>
        /// <param name="messageId">消息ID</param>
        /// <param name="rating">评分(1-5)</param>
        /// <param name="feedback">反馈内容</param>
        Task RateResponseAsync(string sessionId, string messageId, int rating, string? feedback = null);

        /// <summary>
        /// 初始化知识库
        /// </summary>
        Task InitializeKnowledgeBaseAsync();

        /// <summary>
        /// 添加知识库文档
        /// </summary>
        /// <param name="document">文档内容</param>
        /// <param name="metadata">元数据</param>
        Task AddKnowledgeDocumentAsync(string document, Dictionary<string, object> metadata);
    }
} 